
#include "nx_api.h"

#ifdef __PRODUCT_NETXDUO__

#include "netx_mdns_test.h"

/* Frame (237 bytes) */
static const unsigned char pkt7[237] = {
0x01, 0x00, 0x5e, 0x00, 0x00, 0xfb, 0x00, 0x11, /* ..^..... */
0x22, 0x33, 0x44, 0x57, 0x08, 0x00, 0x45, 0x00, /* "3DW..E. */
0x00, 0xdf, 0x00, 0x07, 0x40, 0x00, 0xff, 0x11, /* ....@... */
0x8f, 0xc9, 0x0a, 0x00, 0x00, 0x42, 0xe0, 0x00, /* .....B.. */
0x00, 0xfb, 0x14, 0xe9, 0x14, 0xe9, 0x00, 0xcb, /* ........ */
0x49, 0x59, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, /* IY...... */
0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x41, /* .......A */
0x52, 0x4d, 0x4d, 0x44, 0x4e, 0x53, 0x54, 0x65, /* RMMDNSTe */
0x73, 0x74, 0x05, 0x5f, 0x68, 0x74, 0x74, 0x70, /* st._http */
0x04, 0x5f, 0x74, 0x63, 0x70, 0x05, 0x6c, 0x6f, /* ._tcp.lo */
0x63, 0x61, 0x6c, 0x00, 0x00, 0x21, 0x80, 0x01, /* cal..!.. */
0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, /* ........ */
0x00, 0x00, 0x00, 0x50, 0x0b, 0x41, 0x52, 0x4d, /* ...P.ARM */
0x4d, 0x44, 0x4e, 0x53, 0x54, 0x65, 0x73, 0x74, /* MDNSTest */
0x05, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x00, 0x0b, /* .local.. */
0x41, 0x52, 0x4d, 0x4d, 0x44, 0x4e, 0x53, 0x54, /* ARMMDNST */
0x65, 0x73, 0x74, 0x05, 0x5f, 0x68, 0x74, 0x74, /* est._htt */
0x70, 0x04, 0x5f, 0x74, 0x63, 0x70, 0x05, 0x6c, /* p._tcp.l */
0x6f, 0x63, 0x61, 0x6c, 0x00, 0x00, 0x10, 0x80, /* ocal.... */
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x08, /* ........ */
0x70, 0x61, 0x70, 0x65, 0x72, 0x3d, 0x41, 0x34, /* paper=A4 */
0x0a, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, /* .version */
0x3d, 0x30, 0x31, 0x05, 0x5f, 0x68, 0x74, 0x74, /* =01._htt */
0x70, 0x04, 0x5f, 0x74, 0x63, 0x70, 0x05, 0x6c, /* p._tcp.l */
0x6f, 0x63, 0x61, 0x6c, 0x00, 0x00, 0x0c, 0x00, /* ocal.... */
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x0b, /* ........ */
0x41, 0x52, 0x4d, 0x4d, 0x44, 0x4e, 0x53, 0x54, /* ARMMDNST */
0x65, 0x73, 0x74, 0x05, 0x5f, 0x68, 0x74, 0x74, /* est._htt */
0x70, 0x04, 0x5f, 0x74, 0x63, 0x70, 0x05, 0x6c, /* p._tcp.l */
0x6f, 0x63, 0x61, 0x6c, 0x00                    /* ocal. */
};

static MDNS_SERVICE mdns_service = {"ARMMDNSTest", "_http._tcp", NX_NULL, "paper=A4;version=01", 100, 0, 0, 80, NX_MDNS_RR_SET_UNIQUE, 0};


MDNS_TEST_SEQ mdns_server_send_goodbye[] = {
    {TITLE, "Server send goodbye", 19, 0},

    /* Add a service. */
    {MDNS_SERVICE_ADD, (char*)&mdns_service, 0, 0},
    {WAIT, NX_NULL, 0, 5},
    {DUMP, NX_NULL, 0, 0},

    /* Delete all services. */
    {MDNS_SERVICE_DELETE, (char*)&mdns_service, 0, 0},

    /* Check for the goodbye packet. */
    {MDNS_CHECK_DATA_V4, (char*)&pkt7[0], sizeof(pkt7), 1},
};

int mdns_server_send_goodbye_size = sizeof(mdns_server_send_goodbye) / sizeof(MDNS_TEST_SEQ);

#endif /* __PRODUCT_NETXDUO__  */
